<%--
  Created by IntelliJ IDEA.
  User: 杨威
  Date: 2021/9/16
  Time: 14:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>修改学生</h1>
<form action="update">
    <table>
        <tr>
            <td>学生ID</td>
            <td><input type="text" value="${stu.stuId}" name="stuId" readonly/></td>
        </tr>
        <tr>
            <td>学生姓名</td>
            <td><input type="text" name="stuName" value="${stu.stuName}"/></td>
        </tr>
        <tr>
            <td>性别</td>
            <td><input type="text" name="stuGender" value="${stu.stuGender}"/></td>
        </tr>
        <tr>
            <td>手机号</td>
            <td><input type="text" name="stuPhone" value="${stu.stuPhone}"/></td>
        </tr>
        <tr>
            <td>出生日期</td>
            <td><input type="date" name="bornDate" value="${stu.bornDate}"/></td>
        </tr>
        <tr>
            <td>邮箱</td>
            <td><input type="text" name="stuEmail" value="${stu.stuEmail}"/></td>
        </tr>
        <tr>
            <td>地址</td>
            <td><input type="text" name="stuAddress" value="${stu.stuAddress}"/></td>
        </tr>
        <tr>
            <td>班级</td>
            <td>
                <select name="gradeId">
                    <c:forEach items="${grades}" var="grade">
                        <option value="${grade.gradeId}" <c:if test="${stu.gradeId==grade.gradeId}">selected</c:if>>${grade.gradeName}</option>
                    </c:forEach>
                </select>
            </td>
        </tr>
        <tr>
            <td colspan="8">
                <input type="submit" value="提交"/>
                <input type="reset" value="重填"/>
            </td>
        </tr>
    </table>
</form>
</body>
</html>
